from db.dbUtils import MysqlPool


def get_department_by_f_id_dao(f_id):
    sql = """
    SELECT * FROM `se_department` WHERE `f_id`={}
    """.format(f_id)
    with MysqlPool() as pool:
        cursor = pool.cursor
        cursor.execute(sql)
        return cursor.fetchall()


def get_departments_dao():
    sql = """
    SELECT * FROM `se_department`
    """
    with MysqlPool() as pool:
        cursor = pool.cursor
        cursor.execute(sql)
        return cursor.fetchall()